/**
 * 
 */
package pt.mleiria.bean;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

import org.apache.log4j.Logger;

import pt.mleiria.utils.Navigator;

/**
 * @author NB13712
 * 
 */
@ManagedBean(name = "masterBean")
@RequestScoped
public class MasterBean{
	protected static Logger LOG;
	protected int index;
	
	
	public static Logger getLogger(Class clazz){
		return Logger.getLogger(clazz);
	}
	
	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	public String redirect(int activeIndex) {
		
		switch(activeIndex){
		case 0:
			index = Navigator.Overview.getValue();
			return Navigator.Overview.getLnk();
		case 1:
			index = Navigator.LivingRoom.getValue();
			return Navigator.LivingRoom.getLnk();
		default:
			index = Navigator.Overview.getValue();
			return Navigator.Overview.getLnk();
		}
		
		
		
	}


}
